package com.hsgene.sample.persistence;

import com.hsgene.sample.condition.SampleCondition;
import com.hsgene.sample.domain.GeneticTestingAgencySample;
import com.hsgene.sample.dto.GeneticTestingAgencySampleDto;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface GeneticTestingOrgSampleRepository {
    int deleteByPrimaryKey(String id);

    int insert(GeneticTestingAgencySample record);

    int insertSelective(GeneticTestingAgencySample record);

    GeneticTestingAgencySample selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(GeneticTestingAgencySample record);

    int updateByPrimaryKey(GeneticTestingAgencySample record);

    int insertSmple(GeneticTestingAgencySample geneticTestingOrgSampleDto);

    /**
     * 获取总数
     *
     * @param condition
     * @return
     */
    int getCount(@Param("condition") SampleCondition condition);

    /**
     * 查列表
     *
     * @param condition
     * @return
     */
    List<GeneticTestingAgencySampleDto> queryList(@Param("condition") SampleCondition condition);

    /**
     * 修改样本
     *
     * @param geneticTestingOrgSampleDto
     * @return
     */
    int updateSampleDto(GeneticTestingAgencySampleDto geneticTestingOrgSampleDto);

    /**
     * 逻辑删除
     *
     * @param geneticTestingOrgSampleDto
     * @return
     */
    int deleteSampleDto(GeneticTestingAgencySampleDto geneticTestingOrgSampleDto);

    GeneticTestingAgencySampleDto queryById(String id);

    /**
     * 获取全部
     *
     * @return
     */
    List<GeneticTestingAgencySampleDto> getAll();

    /**
     * 根据ids查找样本
     *
     * @param id
     * @return
     */
    List<GeneticTestingAgencySampleDto> getByids(String[] id);


    int updateSampleUsed(String id);
}